<div class="box_right">
	<h1>结算查询</h1>
	<p class="note">每月1号完成上个月结算，当前数据更新至<?php echo date('Y-m-t', strtotime('-1 month')); ?> 23:59:59</p>
	<div class="pro_box">
		<div class="layui-form-item">
		  <div class="layui-inline">
		  	<form class="layui-form" action="<?php echo base_url().'third/order/jiesuan'?>" method="get">
		  		<?php if(!empty($city_id)):?>
					<input name="city_id" type="hidden" value="<?php echo $city_id?>">
				<?php endif?>
			    <label class="layui-form-label" style="width: 110px;">结算日期</label>
			    <div class="layui-input-inline" style="width: 200px;">
			    	<input type="text" name="date1" class="layui-input" id="test5" placeholder="年-月" value="<?php if (isset($date1))echo $date1;?>">
			    </div>
			    <div class="layui-form-mid">到</div>
			    <div class="layui-input-inline" style="width: 200px;">
			    	<input type="text" name="date2" class="layui-input" id="test6" placeholder="年-月" value="<?php if (isset($date2))echo $date2;?>">
			    </div>
			  
			  </div>
			  </div>
			  <div class="layui-form-item">
			    <div class="layui-input-block">
			      <button class="btn_tj">查询</button>
			    </div>
			  </div>
		  </form>
		  <div class="order_list">
		  	<div class="layui-row">
		  		<div class="layui-col-xs4">
		  			<h2 class="order_list_h">列表</h2>
		  		</div>
		  		<!--<div class="layui-col-xs1 layui-col-xs-offset7">
		  			<button class="btn_get">导出</button>
		  		</div>-->
		  	</div>
		  		
			<table class="layui-table ct" lay-skin="line">

			  <thead>
			    <tr >
			      <th>结算日期</th>
			      <th>订单金额</th>
			      <th>佣金总额</th>
			      <th>操作</th>
			    </tr> 
			  </thead>
			  <tbody>
			  	<?php if (isset($result)&&count($result)>0){
					foreach ($result as $app){
				?>
			    <tr>
			      <td><?php echo $app['date_line'];?></td>
			      <td><?php echo $app['order_price'];?></td>
				  <td><?php echo $app['order_commission'];?></td>
			  
			      <td>
			      	<a class="get" href="<?php echo base_url().'third/order/settlement_up_execl/'.$app['date_line'];?>">导出结算单</a>
			      	
			      </td>
			    </tr>
				<?php }
					}else{?>
					<tr>
						<td colspan="7">无数据</td>
					</tr>
				<?php }?>
			  </tbody>
			</table>
		  </div> 
	</div>
</div>
<script>
//Demo
/*
layui.use(['form','element','laydate'], function(){
  var form = layui.form,
  	element = layui.element,
  	laydate = layui.laydate;

  //时间选择器
  laydate.render({
    elem: '#test5'
  });
    //时间选择器
  laydate.render({
    elem: '#test6'
  }); 
  
  //监听提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    return false;
  });
});*/
</script>	